﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Globalization;
using Sector7.Framework.Enums;

namespace Sector7.Restaurant.Modules.STAT.Utility
{
    public class ChargeTypeToStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            ChargeType chargeType = (ChargeType)value;
            switch (chargeType)
            {
                case ChargeType.Expenditures:
                    return "支出";
                case ChargeType.Revenues:
                    return "收入";
                default:
                    return "其它";
            }
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
